package com.prototype.demo.practice;

/**
 * Created by Administrator on 2017/6/9.
 */
//浅克隆
public class ShallowCustomer implements Cloneable{
    private Address address;

    public void setAddress(Address address){
        this.address = address;
    }

    public Address getAddress(){
        return this.address;
    }

    public ShallowCustomer clone(){
        try{
            return (ShallowCustomer)super.clone();
        }catch(CloneNotSupportedException cse){
            System.out.println("不支持克隆");
            return null;
        }
    }
}
